﻿using J.Status.Application.Command.RoomNumCommand;
using MediatR;
using StatusService;

namespace J.Status.Application.Handler.RoomNumHandler
{
    public class RoomNumUpdateSHandler:IRequestHandler<RoomNumUpdateSCommand,int>
    {
        private readonly IRoomNumManageService roomNumManageService;
        public RoomNumUpdateSHandler(IRoomNumManageService roomNumManageService)
        {
            this.roomNumManageService = roomNumManageService;
        }

        public async Task<int> Handle(RoomNumUpdateSCommand request, CancellationToken cancellationToken)
        {
            return await roomNumManageService.RoomNumUpdateS(request.Id, request.state);
        }
    }
}
